﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ESupervision.Models
{
    public class Comment
    {

        public int CommentID { get; set; }

        public string UserId { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Time")]
        public DateTime CommentTime { get; set; }

        [Required]
        [MaxLength(2000)]
        public string Content { get; set; }

        public int DocumentID { get; set; }

        public virtual Document Document { get; set; }

        [ForeignKey("UserId")]
        public virtual ApplicationUser User { get; set; }
    }
}